-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZOOKEEPER-4907: Stop client packets processing after server channel closed #2236
Conversation
The root cause for the error throw is caused by follow logic: |
Seems that there are multiple incoming packets during server close. Since |
@kezhuw thanks for comment. I update the code according to your suggestion. You can help to double check. thanks |
test fail? no relationshiop with this commit? |
zookeeper-server/src/main/java/org/apache/zookeeper/server/NettyServerCnxn.java
Outdated
Show resolved
Hide resolved
…tyServerCnxn.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for handling this.
…losed Reviewers: kezhuw, tisonkun Author: jiafu1115 Closes #2236 from jiafu1115/jiafu1115-patch-1 (cherry picked from commit 6e4ec27) Signed-off-by: Kezhu Wang <[email protected]>
@jiafu1115 Thank you for your contribution! Merged to master and backported to branch-3.9. |
|
Refer to ZOOKEEPER-4907
We got the error:
2024-11-07 19:03:01,414 [myid:14] - WARN [nioEventLoopGroup-7-25:NettyServerCnxn@537] - Closing connection to /135.224.186.250:47051
java.io.IOException: Len error 794913900
at org.apache.zookeeper.server.NettyServerCnxn.receiveMessage(NettyServerCnxn.java:521)
at org.apache.zookeeper.server.NettyServerCnxn.processMessage(NettyServerCnxn.java:374)
at org.apache.zookeeper.server.NettyServerCnxnFactory$CnxnChannelHandler.channelRead(NettyServerCnxnFactory.java:357)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead
It cause us very confused about it whether we write some big data into zookeeper. Thus. After trouble shooting, we found that it is just the log/issue when closing the server caused by reelecting the leader sometimes. In actually. We don't send any big data.
So I think we can do one tiny code change to avoid throw the error which causing confusion to reduce trouble shooting effort.